package com.getan.boot.common.utils;

import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;

/**
 * 日期辅助类
 *
 * @author Bruce.Gong
 * @since 1.0.0-SNAPSHOT
 */
@SuppressWarnings("unused")
public interface DateHelper {

    /**
     * 默认时区偏移，东八区，8小时
     */
    ZoneOffset DEFAULT_ZONE = ZoneOffset.ofHours(8);

    /**
     * 时间格式 -- yyyy-MM-dd
     */
    String DATE_PATTERN = "yyyy-MM-dd";

    /**
     * @see #DATE_PATTERN
     */
    DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern(DATE_PATTERN);

    /**
     * 时间格式 -- yyyy-MM-dd HH:mm:ss
     */
    String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";

    /**
     * @see #DATE_TIME_PATTERN
     */
    DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DATE_TIME_PATTERN);

    /**
     * 时间格式 -- yyyy-MM-dd HH:mm
     */
    String DATE_TIME_MINUTE_PATTERN = "yyyy-MM-dd HH:mm";

    /**
     * @see #DATE_TIME_MINUTE_PATTERN
     */
    DateTimeFormatter DATE_TIME_MINUTE_FORMATTER = DateTimeFormatter.ofPattern(DATE_TIME_MINUTE_PATTERN);

    /**
     * 时间格式 -- HH:mm:ss
     */
    String TIME_PATTERN = "HH:mm:ss";

    /**
     * @see #TIME_PATTERN
     */
    DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern(TIME_PATTERN);

    /**
     * 时间格式 -- HH:mm
     */
    String TIME_MINUTE_PATTERN = "HH:mm";

    /**
     * @see #TIME_MINUTE_PATTERN
     */
    DateTimeFormatter TIME_MINUTE_FORMATTER = DateTimeFormatter.ofPattern(TIME_MINUTE_PATTERN);

    /**
     * 时间格式：yyyy年MM月dd日
     */
    String CHINESE_DATE_PATTERN = "yyyy年MM月dd日";

    /**
     * @see #CHINESE_DATE_PATTERN
     */
    DateTimeFormatter CHINESE_DATE_FORMATTER = DateTimeFormatter.ofPattern(CHINESE_DATE_PATTERN);

    /**
     * 时间格式：yyyyMMdd
     */
    String PURE_DATE_PATTERN = "yyyyMMdd";

    /**
     * @see #PURE_DATE_PATTERN
     */
    DateTimeFormatter PURE_DATE_FORMATTER = DateTimeFormatter.ofPattern(PURE_DATE_PATTERN);

    /**
     * 时间格式：yyMMdd
     */
    String SIMPLE_PURE_DATE_PATTERN = "yyMMdd";

    /**
     * @see #PURE_DATE_PATTERN
     */
    DateTimeFormatter SIMPLE_PURE_DATE_FORMATTER = DateTimeFormatter.ofPattern(SIMPLE_PURE_DATE_PATTERN);

}